<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  Zend
 * @package   Zend_DataGrid
 * @subpackage Column
 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd     New BSD License
 */

/** @see Zend_DataGrid_Column */
require_once 'Zend/DataGrid/Column.php';



/**
 * Zend_DataGrid_Column_Radiobox
 *
 * The Zend_DataGrid_Column_Radiobox represents a radiobox column that is bound to a field in a data source.
 * The selected state of the radioboxes are determiend by the bound data at {@link getDataField}.
 * If {@link getReadOnly} is false, the radiobox column will display an enabled radiobox
 * provided the cells are in edit mode. Otherwise, the checkboxes will be disabled to prevent from editting
 *
 * @category   Zend
 * @package    Zend_DataGrid
 * @subpackage Column
 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd     New BSD License
 * @version   $Id: Radiobox.php 6137 2008-09-13 17:37:27Z azoungrana $
 */
class Zend_DataGrid_Column_Radiobox extends Zend_DataGrid_Column
{
    /**
     * Whether the items in the column can be edited. Defaults to false.
     *
     * @var boolean
     */
    protected $_readOnly = false;

    /**
     * Set element read only
     *
     * @param  boolean $value
     * @return Zend_DataGrid_Column
     */
    public function setReadOnly($value)
    {
        $this->_readOnly = (boolean) $value;
        return $this;
    }

    /**
     * Retrieve element read only
     *
     * @return boolean
     */
    public function getReadOnly()
    {
        return $this->_readOnly;
    }


}
